﻿using MediatR;
using RBAC.LuFang.API.Application.Command.GoodsCommand;
using RBAC.LuFang.Domain.Traceability;
using RBAC.LuFang.Domin.Services.TraceabilityService;

namespace RBAC.LuFang.API.Application.CommandHandlers.GoodsHandler
{
    //商品反填
    public class GoodsFanCommandHandler:IRequestHandler<GoodsFanCommand,Goods>
    {
        private readonly IGoodsService _goodsService;

        public GoodsFanCommandHandler(IGoodsService goodsService)
        {
            _goodsService = goodsService;
        }

        public async Task<Goods> Handle(GoodsFanCommand request, CancellationToken cancellationToken)
        {
            return await _goodsService.GetGoods(request.id);
        }
    }
}
